home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 009 / unprot.arc / SIDEKICK.TXT < prev    next >
Text File  |  1986-03-27  |  11KB  |  234 lines

  1. ***************************** SIDEKICK Ver. 1.00A ****************
  2.  
  3. This is the procedure for bypassing the copy protection scheme used by
  4. SIDEKICK,  version 1.00A.
  5.  
  6. Using DEBUG on SK.COM, NOP out the CALL 8780 at location 071A ----+
  7.                                                                   |
  8. Change the OR  AL,AL at 072D to  OR  AL,01 --------+              |
  9.                                                    |              |
  10. ......and that's it!                               |              |
  11.                                                    |              |
  12.                      (BEFORE ZAP)                  |              |
  13. 78A7:071A E86380        CALL    8780 <----------------------------+
  14. 78A7:071D 2E            CS:                        |              |
  15. 78A7:071E 8E163D02      MOV     SS,[023D]          |              |
  16. 78A7:0722 2E            CS:                        |              |
  17. 78A7:0723 8B263F02      MOV     SP,[023F]          |              |
  18. 78A7:0727 1F            POP     DS                 |              |
  19. 78A7:0728 59            POP     CX                 |              |
  20. 78A7:0729 880E1300      MOV     [0013],CL          |              |
  21. 78A7:072D 0AC0          OR      AL,AL   <----------+              |
  22.                                                    |              |
  23.                      (AFTER ZAP)                   |              |
  24. 78A7:071A 90            NOP         <-----------------------------+
  25. 78A7:071B 90            NOP         <-----------------------------+
  26. 78A7:071C 90            NOP         <-----------------------------+
  27. 78A7:071D 2E            CS:                        |
  28. 78A7:071E 8E163D02      MOV     SS,[023D]          |
  29. 78A7:0722 2E            CS:                        |
  30. 78A7:0723 8B263F02      MOV     SP,[023F]          |
  31. 78A7:0727 1F            POP     DS                 |
  32. 78A7:0728 59            POP     CX                 |
  33. 78A7:0729 880E1300      MOV     [0013],CL          |
  34. 78A7:072D 0C01          OR      AL,01   <----------+
  35.  
  36. ***************************** SIDEKICK Ver. 1.10A ****************
  37.  
  38. This procedure will unprotect the version 1.10A of SIDEKICK.
  39.  
  40. Many thanks to the individual who provided the procedure
  41. for the version 1.00A.
  42.  
  43. The only major difference between the two versions is the offset
  44. address of the instructions to be modified.
  45.  
  46. Using DEBUG on SK.COM, NOP out the CALL 8C1E at location 07CA ----+
  47.                                                                   |
  48. Change the OR  AL,AL at 07D9 to  OR  AL,01 --------+              |
  49.                                                    |              |
  50. ......and that's it!                               |              |
  51.                                                    |              |
  52.                      (BEFORE ZAP)                  |              |
  53. 78A7:07CA E85184        CALL    8C1E <----------------------------+
  54. 78A7:07CD 2E            CS:                        |              |
  55. 78A7:07CE 8E163E02      MOV     SS,[023E]          |              |
  56. 78A7:07D2 2E            CS:                        |              |
  57. 78A7:07D3 8B264002      MOV     SP,[0240]          |              |
  58. 78A7:07D7 1F            POP     DS                 |              |
  59. 78A7:07D8 59            POP     CX                 |              |
  60. 78A7:07D9 0AC0          OR      AL,AL   <----------+              |
  61.                                                    |              |
  62.                      (AFTER ZAP)                   |              |
  63. 78A7:07CA 90            NOP         <-----------------------------+
  64. 78A7:07CB 90            NOP         <-----------------------------+
  65. 78A7:07CC 90            NOP         <-----------------------------+
  66. 78A7:07CD 2E            CS:                        |
  67. 78A7:07CE 8E163E02      MOV     SS,[023E]          |
  68. 78A7:07D2 2E            CS:                        |
  69. 78A7:07D3 8B264002      MOV     SP,[0240]          |
  70. 78A7:07D7 1F            POP     DS                 |
  71. 78A7:07D8 59            POP     CX                 |
  72. 78A7:07D9 0C01          OR      AL,01   <----------+
  73. ***************************** SIDEKICK Ver. 1.11C ****************
  74.  
  75.  
  76.              What follows is an unprotect scheme for version 1.11C of
  77.            Borland International's Sidekick.  The basic procedure is the
  78.            same as that for version 1.1A with just location differences.
  79.                So the only credit I can take is for finding the new
  80.                                     locations!
  81.  
  82.  
  83.         This is (of course), provided only for legal owners of Sidekick!!
  84.  
  85.                Also, make sure you 'DEBUG' a copy NOT the original!
  86.  
  87.  
  88.         DEBUG SK.COM    <ENTER>
  89.         -U 801          <ENTER>
  90.         -E 801          <ENTER>
  91.         you will then see:
  92.         25E5:0801    E8.
  93.         90              <ENTER>
  94.         repeat for 802 and 803:
  95.         -E 802          <ENTER>
  96.         90              <ENTER>
  97.         -E 803          <ENTER>
  98.         90              <ENTER>
  99.         then:
  100.         -A 810          <ENTER>
  101.         OR AL,01        <ENTER>
  102.         <ENTER>
  103.         -U 801          <ENTER>
  104.         you should then see (among other things):
  105.         XXXX:801       90     NOP
  106.         XXXX:802       90     NOP
  107.         XXXX:803       90     NOP
  108.  
  109.         XXXX:810  0C01     OR     AL,01
  110.         if so:
  111.         -W              <ENTER>
  112.         -Q              <ENTER>
  113.         if not:
  114.         -Q              <ENTER>
  115.  
  116.             +++++++++++++++++++++++++++++++++++++++++++++++++++++
  117.  
  118.  
  119.              For SKN.COM, SKM.COM and SKC.COM the unprotect is the same
  120.         but at the following locations:
  121.  
  122.              SK          SKN          SKM          SKC
  123.              ---         ---          ---          ---
  124.              801         7DF          76F          7BC
  125.              802         7E0          770          7BD
  126.              803         7E1          771          7BE
  127.              810         7EE          77E          7CB
  128.  
  129.         To unprotect SKC.COM you would 'DEBUG SKC.COM' and then replace
  130.         any occurence of '801' with '7BC'; '802' with '7BD' and so on.
  131.  
  132.                               GOOD LUCK!
  133. ************************** MISC. **********************
  134.  
  135. TIMER          Found on Compuserve
  136.  
  137.     Keywords: SIDEKICK PRINT BORLAND TIMER INTERRUPT FIX PATCH
  138.  
  139.     This is an explination of the internal workings of Print.Com, a file
  140.     included in DOS for the IBM PC and compatibles.  It explains how this
  141.     program fails to do its part to insure integrity of all registers.  For
  142.     this reason some trouble was being experienced while using both SideKick
  143.     and Print.
  144.  
  145. .op
  146. The timer tick generates an interrupt 8 18.2 per second.  When SK
  147. is not active, this interrupt is handled by the Bios as follows:
  148.  
  149. It  pushes  all registers used by the routine (AX among  others.)
  150. It updates the system timer count.
  151. It updates the disk motor timer count.
  152. It generates an int 1C.
  153.  
  154. When  the spooler is active,  it has placed a vector at  int  1C,
  155. pointing  at  the  spooler's  code.   The  spooler  is  therefore
  156. activated in the middle of the int 8 handling.   The cause of the
  157. trouble  is  that the spooler now uses the ax register  with  out
  158. saving  it first.   The fact that this usually doesn't cause  any
  159. problems is that the Bios int 8 routine restores the ax  register
  160. when the Spooler returns.
  161.  
  162. It generates an end-of-interrupt to the interrupt controler.
  163. It pops the registers that where pushed.
  164. It does an interrupt return.
  165.  
  166. With  SK  loaded it's a different story because SK uses int 8  to
  167. check  the  keyboard  for CTRL-Alt.   We  therefore  replace  the
  168. address  of  the bios int 8 routine with the address of  our  own
  169. routine.  The address of the bios routine is saved in order to be
  170. able to call it later.
  171.  
  172. When you first start SK from DOS, we read the int 10 detector and
  173. store  it.   Then, each time you activate SK,  we also  read  and
  174. store   the  vector  at  int 10 and  then  replace   it  with  an
  175. interrupt return.
  176.  
  177. At each timer tick, the following happens:
  178.  
  179. SK  received the int  8 and calls the bios int 8 routine to  make
  180. sure  that the timer tick is properly handles.   The bios  int  8
  181. routine does the same as above:
  182.  
  183. It pushes all registers used by the routine (AX among others).
  184. It updates the system timer count.
  185. It updates the disk motor timer count.
  186. It generates an int 10.
  187. SK  has replaced the vector that the spooler placed here  with  a
  188. IRET,  so  nothing happens.   This is because we cannot allow the
  189. timer tick to pass through to programs which use it,  for example
  190. to write on the screen.
  191.  
  192. It generates an end-of-interrupt to the interrupt controler.
  193. It pops the registers that were pushed.
  194. It does an interrupt return.
  195.  
  196. Back in SK's int 8 routine we make a call to the address that was
  197. stored at int 10 when SK was first started.  In this way he still
  198. services any resident programs that were loaded before SK.   With
  199. the spooler active we therefore make a call to the spooler.
  200.  
  201. The  spooler  again corrupts the AX register because it  uses  it
  202. without saving it first.
  203. Back  in SK we have no way of restoring the original contents  of
  204. the  AX register because we did not save it (why  should  we,  we
  205. don't use it.)
  206.  
  207. In  short,  the root of the trouble is that the spooler  destroys
  208. the AX register.  The fact that the Bio's int 8 routine saves and
  209. stores it is pure coincidence.
  210.  
  211. I quote from the Technical Reference Manual,  Pages 2-5,  Section
  212. Interrupt Hex 1C-timer tick:
  213.  
  214. "It is the responsibility of the application to save and  restore
  215. all registers that will be modified."
  216.  
  217. Relying  on a version of the Bios which happens to save  register
  218. AX is bad programming practice.   However,  the guy who wrote the
  219. print  spooler did not rely on this because at another  point  in
  220. his  program  he  does correctly save AX.   Obviously  he  simply
  221. forgot and fortunately for him the Bios saved him.
  222.  
  223. The following patch will fix the problem:
  224.  
  225. SK.COM unprotected version change 7F8: 55 to 7F8: 50
  226. SK.COM unprotected version change 805: 5D to 805: 58
  227.  
  228. SK.COM protected version change 801: 55 to 801: 50
  229. SK.COM protected version change 80E: 5D to 80E: 58
  230.  
  231. Also on both above change 012C: 41 to 012C: 42
  232.